
(let ((z (memoize-zero (lambda () (inform "ONCE ONLY") 'z))))
  (map (lambda (n) (z)) (iota 12)))

(let ((z (memoize (lambda (x) (inform "THRICE ONLY") x))))
  (map (lambda (n) (z n)) '(1 1 2 2 3 3)))

;; Naive Fibonnaci.

(define (f n)
  (cond ((= n 0) 0)
	((= n 1) 1)
	(else (+ (f (- n 1))
		 (f (- n 2))))))

(timeE (f 28))

;; Memoized Fibonnaci.

(define m 
  (memoize
   (lambda (n)
     (cond ((= n 0) 0)
	   ((= n 1) 1)
	   (else (+ (m (- n 1))
		    (m (- n 2))))))))

(timeE (m 28))
